package com.bao.demo.work.flower.dao.impl;

import com.bao.demo.utils.BaseDAO;
import com.bao.demo.work.flower.dao.FlowerDao;
import com.bao.demo.work.flower.entity.Flower;

import java.util.List;

/**
 * @author baoye
 * @date 2024-08-23/19:46
 */
public class FlowerDaoImpl implements FlowerDao {
    @Override
    public List<Flower> selectAllFlower(String sql) {
        return BaseDAO.selectMul(sql, Flower.class);
    }

    @Override
    public Flower selectFlowerById(String sql, int id) {
        return BaseDAO.selectOne(sql,Flower.class,id);
    }

    @Override
    public int update(String sql,Flower flower,int id) {
        return BaseDAO.update(sql,flower,id);
    }

    @Override
    public int delete(String sql, int id) {
        return BaseDAO.deleteOne(sql,id);
    }
}
